package com.dhl.observer.improve;

/**
 * @title: BaiDu
 * @Author danghailiang
 * @Date: 2022/8/22 10:20
 * @Version 1.0
 */
public class BaiDu implements Observer{
    /**
     * 湿度
     */
    private int temperature;
    /**
     * 湿度
     */
    private int humidity;
    /**
     * 压力
     */
    private int pressure;

    @Override
    public void update(int temperature, int pressure, int humidity) {
        this.temperature = temperature;
        this.humidity = humidity;
        this.pressure = pressure;
        display();
    }

    public void display(){
        System.out.println("---------------百度天气预报----------");
        System.out.println("**********Today temperature:" + temperature + "***");
        System.out.println("**********Today humidity:" + humidity + "***");
        System.out.println("**********Today pressure:" + pressure + "***");
    }

    public int getTemperature() {
        return temperature;
    }

    public void setTemperature(int temperature) {
        this.temperature = temperature;
    }

    public int getHumidity() {
        return humidity;
    }

    public void setHumidity(int humidity) {
        this.humidity = humidity;
    }

    public int getPressure() {
        return pressure;
    }

    public void setPressure(int pressure) {
        this.pressure = pressure;
    }
}
